-- GENERATED SPELL FOR [Talonpriest Skizzik] --


function spell0_23067(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(17165,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23067', 3000, 1)
end

function spell1_23067(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(22884,pUnit)
pUnit:RegisterEvent('Sorts_23067', 4304, 1)
end

function spell2_23067(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(32712,pUnit)
pUnit:RegisterEvent('Sorts_23067', 588, 1)
end

function Sorts_23067(pUnit, Event)
local choix_sorts_23067 = math.random(0, 2)
if choix_sorts_23067 == 0 then
pUnit:RegisterEvent('spell0_23067', 1, 1)
end
if choix_sorts_23067 == 1 then
pUnit:RegisterEvent('spell1_23067', 1, 1)
end
if choix_sorts_23067 == 2 then
pUnit:RegisterEvent('spell2_23067', 1, 1)
end
end

function mob23067_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23067', math.random(1500, 3000), 1)
end

function mob23067_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23067_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23067_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23067, 1, 'mob23067_Action')
RegisterUnitEvent(23067, 2, 'mob23067_Leave')
RegisterUnitEvent(23067, 3, 'mob23067_Kill')
RegisterUnitEvent(23067, 4, 'mob23067_Die')
